const path = require('path')
module.exports = {
    entry: './index.js',
    output: {
        filename: 'index.js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
        rules: [
            {
                test: /\.css$/,
                use: ['style-loader', 'css-loader']
            },
        ],
      
    },
    resolve: {
        //解析路径别名,帮助简写路径
        alias: {
            $css: path.resolve(__dirname, 'css')
        },
        extensions: ['.js', '.json', '.wasm','.css'],//配置省略文件的后缀名 import引入无需配置后缀名
        // modules: [path.resolve(__dirname, '../../nodde_modules', 'node_modules')],//告诉webpack解析模块去哪找,原本是不断往上找，直到找到为止，现在可以指定在哪里找
    },
    mode: 'development'
}